<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "order".
 *
 * @property int $id 订单ID
 * @property int $order_num 订单号
 * @property int $order_time 订单创建时间
 * @property int $user_id 订单所有者
 * @property int $order_status 订单状态
 * @property string $order_address 订单地址
 * @property float $order_price
 */
class Order extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'order';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['order_num', 'order_time', 'user_id', 'order_status', 'order_address', 'order_price'], 'required'],
            [['order_num', 'order_time', 'user_id', 'order_status'], 'integer'],
            [['order_price'], 'number'],
            [['order_address'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'order_num' => 'Order Num',
            'order_time' => 'Order Time',
            'user_id' => 'User ID',
            'order_status' => 'Order Status',
            'order_address' => 'Order Address',
            'order_price' => 'Order Price',
        ];
    }
}
